package com.eden.api.utils;

import com.eden.websocket.domain.Message;

import java.util.Comparator;

/**
 * @program: eden
 * @description: ${description}
 * @author: Mr.Jiao
 * @create: 2021-03-09 18:00
 */
public class SortUtils implements Comparator {
    @Override
    public int compare(Object o1, Object o2) {
        Message message1 = (Message) o1;
        Message message2 = (Message) o2;
        int flag = message1.getCreateTime().compareTo(message2.getCreateTime());
        return flag;
    }
}
